<template>
    <product-img v-if="isImg" :productImg="src"/>
    <product-video v-else :url="src"/>
</template>


<script>
  import productImg from '@/components/product/productImg'
  import productVideo from '@/components/product/productVideo'
    export default {
        name: "productImgOrMedia",
      props:{
        type:String,
        src:String,
      },
      computed:{
        isImg:{
            get(){
              if(this.type==='image'){
                return true;
              }
              return false;
            },
            set(){}
          }
      },
      components:{
        productImg:productImg,
        productVideo:productVideo,
      }
    }
</script>

<style scoped>

</style>
